package com.bong.panpan.bongcharttools.custom;

import android.os.Environment;

import java.io.File;

/**
 * Created by panpan on 2017/9/29.
 */

public class Constant {
    private final static String base= Environment.getExternalStorageDirectory().getPath();
    public final static String chartEndName=".bongchart";
    public final static String chartsStorePath=base+"/BongChartTools/Charts";
    public final static String userEndName=".dat";
    public final static String userStorePath=base+"/BongChartTools/User";
    public final static String heartEndName=".dat";
    public final static String heartStorePath=base+"/BongChartTools/Heart";
    public final static String cachePath=base+"/BongChartTools/Cache";
    public final static String cacheChartPath=cachePath+"/CacheChart"+chartEndName;
    public final static String tempRecordPath=base+"/BongChartTools/TempRecord";
    public static void folderInit()
    {
        File file=new File(chartsStorePath);
        if(!file.exists()||!file.isDirectory())
            file.mkdirs();
        file=new File(cachePath);
        if(!file.exists()||!file.isDirectory())
            file.mkdirs();
        file=new File(heartStorePath);
        if(!file.exists()||!file.isDirectory())
            file.mkdirs();
        file=new File(userStorePath);
        if(!file.exists()||!file.isDirectory())
            file.mkdirs();
        file=new File(tempRecordPath);
        if(!file.exists()||!file.isDirectory())
            file.mkdirs();
    }
}
